<template>
	<view class="pad-16r">
		<view class="item success">
			<view class="center pad-10 ">
				<view class="right">
					<u-icon name="checkbox-mark"></u-icon>
				</view>
			</view>
			<view class="font-size-20">出院结算成功</view>
			<view>自助结算成功后，如需纸质单据〔收费单据、费用
				清单、医保结算单)，请到人工窗口打印。
			</view>
		</view>
		<!-- 出院结算成功 -->
		<view class=" item">
			<view class="between-center">
				<view class="border-col font-weight">结算信息</view>
			</view>
			<view>
				<view class="start-center">
					<view class="item-title">运算结果</view>
					<view>预交金退款</view>
				</view>
				<view class="start-center">
					<view class="item-title">退款金额</view>
					<view>￥{{item.refundMoney}}</view>
				</view>
				<view class="start-center">
					<view class="item-title">住院患者</view>
					<view>{{item.patName}}</view>
				</view>
				<view class="start-center">
					<view class="item-title">住院号</view>
					<view>{{item.medicalRecordNo}}</view>
				</view>
				<view class="start-center">
					<view class="item-title">床位号</view>
					<view>{{item.bedNo}}</view>
				</view>
				<view class="start-center">
					<view class="item-title">住院院区</view>
					<view>{{item.campusName}}</view>
				</view>
				<view class="start-center">
					<view class="item-title">住院科室</view>
					<view>{{item.departmentName}}</view>
				</view>
				<view class="start-center">
					<view class="item-title">住院病区</view>
					<view>{{item.wardName}}</view>
				</view>
				<view class="start-center">
					<view class="item-title">入院日期</view>
					<view>{{item.inHospitalTime}}</view>
				</view>
				<view class="start-center">
					<view class="item-title">出院日期</view>
					<view>{{item.leaveHospitalTime}}</view>
				</view>
				<view class="start-center">
					<view class="item-title">住院天数</view>
					<view>{{inHospitalDay}} 天</view>
				</view>
				<view class="start-center">
					<view class="item-title">结算时间</view>
					<view>{{item.settlementTime}} </view>
				</view>
				<view class="start-center">
					<view class="item-title">退款时间</view>
					<view>{{item.refondTime}}</view>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	import {
		getDaysBetweenDates
	} from '../../../utils/assist'
	import ButtonVue from '../../../components/Button/Button.vue'
	export default {
		components: {
			ButtonVue
		},
		data() {
			return {
				item: {}
			}
		},
		computed: {
			inHospitalDay() {
				return getDaysBetweenDates(this.item.inHospitalTime, this.item.leaveHospitalTime)
			}
		},
		onLoad(e) {
			this.item = JSON.parse(e.item)
			console.log(this.item)
		},
		methods: {

		}
	}
</script>

<style scoped>
	.success {
		color: rgb(78, 209, 172);
		text-align: center;
		line-height: 25px;

		.right {
			background-color: rgb(226, 247, 241);
			border-radius: 90px;
			width: 40px;
			height: 40px;
			line-height: 40px;
		}
	}

	.status-0 {
		background: #eba242;
		padding: 3px 10px;
		border-radius: 16rpx;
		color: white;
	}

	.status-1 {
		background: #0cbd30;
		padding: 3px 10px;
		border-radius: 16rpx;
		color: white;
	}
</style>